<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src=".././static/js/public-head.js"></script>
</head>
<body style="overflow-y: hidden">

<div class="layui-card"  >
    <div class="layui-card-body"  >
        <form class="layui-form " action="javascript:;" lay-filter="layedit-form">
            <div class="layui-form-item ">
                <textarea type="text"  name="layedit" style="height: 296px"   id="layedit"   autocomplete="off" class="layui-textarea"></textarea>
            </div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="layedit-form-bt">确定</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

</body>

<script type="text/javascript">

    layui.use([  'form' ], function() {
        var $ = layui.$;
        form = layui.form;
        layedit = layui.layedit;

        var targetDom =  "#"+urlParam.split("|")[1]
        form.val("layedit-form",{layedit: $(targetDom , parent.document).val()})
        form.on("submit(layedit-form-bt)",function(obj){
            $(targetDom , parent.document).val(obj.field.layedit)
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
            return false
        })
    });
</script>